package com.nxy.spring.controller

import com.nxy.spring.logic.ProvideClient
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.web.bind.annotation.GetMapping
import org.springframework.web.bind.annotation.RestController

/**
 *
 */
@RestController
class IndexController() {

    @Autowired
    private var provideClent: ProvideClient? = null


    @GetMapping("/")
    fun index() = "hello, i am consume"

    @GetMapping("/hello")
    fun hello(): String {
        var r = provideClent!!.hello()
        return "call provide r:${r}"
    }
}